package com.longcheng.study.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author totoro.
 * @description .
 * @date 2021/09/22.
 */
@RestController
public class HelloController {

    private Logger logger= LoggerFactory.getLogger(getClass());

    @GetMapping("/hello")
    public String hello(@RequestParam(value = "name",defaultValue = "hadron",required = false)String name){
        logger.info("响应服务消费请求....");
        return "Hello "+name;
    }
}
